package com.atguigu.gmall2020.publisher.service.impl;

import com.atguigu.gmall2020.publisher.bean.MidStats;
import com.atguigu.gmall2020.publisher.bean.ProductStats;
import com.atguigu.gmall2020.publisher.bean.ProvinceStats;
import com.atguigu.gmall2020.publisher.mapper.MidStatsMapper;
import com.atguigu.gmall2020.publisher.mapper.ProductStatsMapper;
import com.atguigu.gmall2020.publisher.mapper.ProvinceStatsMapper;
import com.atguigu.gmall2020.publisher.service.MidStatsService;
//import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MidStatsServiceImpl  implements MidStatsService{
// extends ServiceImpl<MidStatsMapper, MidStats>
    @Autowired
    MidStatsMapper midStatsMapper;

    @Override
    public List<MidStats> getMidStatsByNewFlag(int date) {
        return midStatsMapper.selectMidStatsByNewFlag(date);
    }

    @Override
    public List<MidStats> getMidStatsGroupbyHourNewFlag(int date) {
        return midStatsMapper.selectMidStatsGroupbyHourNewFlag(date);
    }

    @Override
    public Long getPv(int date) {
        return midStatsMapper.selectPv(date);
    }

    @Override
    public Long getUv(int date) {
        return midStatsMapper.selectUv(date);
    }
}
